package com.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @GetMapping({"/login","/"})
    //编写方法转发到登录页面
    public String login(){
        /**
         * 1.因为我们引入了spring-boot-starter-thymeleaf
         * 2.这里就会使用视图解析到thymeleaf下的模板文件adminLogin.html
         */
        return "adminLogin";
    }
}
